<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{%$type.typename%} - {%$lngpack.sitename%}</title>
<meta name="keywords" content="{%$lngpack.keyword%}" />
<meta name="description" content="{%$lngpack.description%}" />
<link href="/css/style_cn.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-1.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
    function query() {
       var beginDate = $('#d12').attr("value");
       var endDate = $('#d13').attr("value");
       if(beginDate == "" || endDate == "") {
           alert("开始时间/结束时间不能为空.");
           return false;
       }
       var d1 = beginDate.split("-");
       var starttime = new Date(d1[0], d1[1], d1[2]).getTime();
       var d2 = endDate.split("-");
       var endtime = new Date(d2[0], d2[1], d2[2]).getTime();
       var daysInterval = 1000 * 60 * 60 * 24 * 45;
       if (endtime - starttime > daysInterval) {
            alert('超出查询时间范围,请确保时间范围在45天内.');
            return false;
       }
       var tr = $('table tr');
       var len = tr.length;
       for (i=1;i<len;i++) {
           tr[i].remove();
       }
       var login = $('#login').attr("value");
       var password = $('#password').attr("value");
       var lng = $('#lng').attr("value");
       
       $.get("/html/query.php", { login:login, password:password, lng:lng, beginDate:beginDate, endDate:endDate},
             function(data){
                $('table tbody').append(data);
             });
    }
</script>
<style>
	a#search {
	background: url(/adminsoft/templates/images/botton.png) no-repeat;
	background-position: 0px -778px;
	height: 21px;
	line-height: 21px;
	width: 48px;
	padding-left: 27px;
	color: #737475;
	display: block;
	text-decoration: none;
}
a:current#search {
	display: block;
	color: #737475;
	text-decoration: none;
}
a:hover#search {
	background: url(/adminsoft/templates/images/botton.png) no-repeat;
	background-position: 0px -799px;
	color: #384466;
	text-decoration: none;
}
</style>
    </head>
    <body>
        <div class="all">
            {%link file="cn/public/head.html"%}
            <div class="content" style="min-height:10px">
                <h2 class="title">{%$type.typename%}</h2>
				<div style="margin-top: 10px">
                    {%include file="default/metaTrader/index_regular.php"%}
                </div>
            </div>
            {%link file="cn/public/footer.html"%}	
        </div>
    </body>
</html>
